package com.hlz.rabbit.mq.confirm;

import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;

/**
 * @author Hongliang Zhu
 * @create 2022-11-28 23:29
 */
public class ConcurrentSkipListMapTest {

    public static void main(String[] args) {
        ConcurrentSkipListMap<Long, String> map = new ConcurrentSkipListMap<>();

        for (long i = 0; i < 100L; i++) {
            map.put(i, "message" + i);
        }

        String s = map.get(10L);

        System.out.println(s);

        // inclusive 是否包含自己
        ConcurrentNavigableMap<Long, String> navigableMap = map.headMap(20L, true);
        System.out.println(navigableMap);
    }
}
